'''

    The KeyboardDevice receives keyUp and keyDown events.

'''

import _abstract

class KeyControl(_abstract.PushControl):
    pass
    
class KeyboardDevice(_abstract.Device):
    def __init__(self):
        _abstract.Device.__init__(self)

    def _as_push_control(self, data):
        '''
        Convert data to KeyControl.
        Data must be the standard keycode of the pressed/released
        key.
        '''
        return KeyControl(data)
